package com.whucke.im.config;

import com.whucke.im.cache.Cache;
import org.jline.utils.AttributedString;
import org.jline.utils.AttributedStyle;
import org.springframework.shell.jline.PromptProvider;
import org.springframework.stereotype.Component;

/**
 * 定义默认提示符
 *
 * @author Zhang Peng
 * @since 2019/2/23 20:53
 */
@Component
public class StarterPromptProvider implements PromptProvider {

    @Override
    public AttributedString getPrompt() {
        return new AttributedString(Cache.CMD_PREFIX, AttributedStyle.DEFAULT.foreground(AttributedStyle.BLUE));
    }

}
